<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchDirtyHeader.ascx.vb"
    Inherits="WebForm_ManageWorkRecord_SearchDirtyHeader" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>
<%@ Register Src="~/WebForm/CommonControl/AnnualControl.ascx" TagName="AnnualControl"
    TagPrefix="My" %>
<%--  <asp:UpdatePanel ID="UpdatePanel1" runat="server">
     <ContentTemplate>  --%>
        <table>
            <tr>
                <td align="right">
                    <asp:Label ID="lblAnnual" runat="server" meta:resourcekey="lblAnnual"></asp:Label>
                </td>
                <td align="left">
                    <My:AnnualControl ID="AnnualControl1" runat="server" />
                </td>
            </tr>
            <tr>
                        <td align="right">
                            <asp:Label ID="lblRegion" runat="server" Text="<%$ Resources:Region %>"></asp:Label>
                        </td>
                        <td align="left">
<%--                        <My:DropDown ID="ddlRegion" runat="server" PopupControlID="pnlRegion" AutoPostBack="true" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged" />
--%>                            <asp:DropDownList ID="ddlRegion" runat="server" DataSourceID="SqlDataSource_Region"
                                DataTextField="RegionName" DataValueField="RegionID" AutoPostBack="true">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource_Region" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>"
                                SelectCommand="SELECT RegionID, RegionName
        FROM Region
        WHERE RegionType='T' AND Parent='TPC'"></asp:SqlDataSource>
                        </td>
                        <td align="right">
                            <asp:Label ID="lblRegion2" runat="server" Text="<%$ Resources:Region2 %>"></asp:Label>
                        </td>
                        <td align="left">
<%--                        <My:DropDown ID="ddlVillageName" runat="server" PopupControlID="pnlVillageName" AutoPostBack="false" />
--%>
                            <asp:DropDownList ID="ddlVillageName" DataSourceID="SqlDataSource1" runat="server" DataTextField="RegionName" DataValueField="RegionID">
                            </asp:DropDownList>
                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>"
                                SelectCommand="SELECT RegionID, RegionName
        FROM Region
        WHERE Parent=@Parent">
                                <SelectParameters>
                            <%-- <asp:Parameter Name="Parent" DefaultValue="0" />--%>
                                  <asp:ControlParameter ControlID="ddlRegion" PropertyName="SelectedValue" Name="Parent" />
                                </SelectParameters>
                            </asp:SqlDataSource>                  
                        </td>
                <td align="left">
                    <asp:Button ID="btnQuery" runat="server" meta:resourcekey="btnQuery" Text="<%$ Resources:Query %>" />
                </td>
            </tr>
        </table>
        <br />
        <My:MyGridView ID="GV" runat="server" SkinID="pager" AllowHoverSelect="False" DataKeyNames="FindDirtyHeaderID,WorkHeaderId"
            AllowHoverEffect="False" MySortDirection="Ascending" AutoGenerateColumns="False"
            AllowPaging="True" AllowSorting="True" MouseOverColor="" TotalRowCount="0" meta:resourcekey="gv">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Active %>">
                    <itemtemplate>
                        <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="RegionName" HeaderText="<%$ Resources:RegionName %>" SortExpression="RegionName" />
                <asp:BoundField DataField="FullLocation" HeaderText="<%$ Resources:FullLocation %>"
                    SortExpression="FullLocation" />
                <asp:BoundField DataField="ReportDate" HeaderText="<%$ Resources:ReportDate %>" SortExpression="ReportDate"
                    DataFormatString="{0:d}" />
                <asp:BoundField DataField="VolunteerName" HeaderText="<%$ Resources:VolunteerName %>"
                    SortExpression="VolunteerName" />
                <asp:BoundField DataField="LeaderName" HeaderText="<%$ Resources:LeaderName %>" SortExpression="LeaderID" />
                <asp:BoundField DataField="TakeDate" HeaderText="<%$ Resources:TakeDate %>" SortExpression="TakeDate" />
                <asp:TemplateField HeaderText="<%$ Resources:WorkStartDate %>">
                    <itemtemplate>
                        <%#Eval("WorkStartDate") %>
                    </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
                <asp:TemplateField>
                    <itemtemplate>
                        <asp:MultiView ID="mvForm" runat="server" ActiveViewIndex="0">
                            <asp:View ID="vwEdit" runat="server">
                        <asp:LinkButton ID="lbtnEdit" runat="server" OnClick="lbtnEdit_Click" Text="<%$ Resources:Edit %>"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnApprove" runat="server" OnClick="lbtnEdit_Click" Text="<%$ Resources:Approve %>"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                            OnClientClick="<%$ Resources:DeleteConfirm %>" Text="<%$ Resources:Delete %>"></asp:LinkButton>
                            </asp:View>                                    
                            <asp:View ID="vwSelect" runat="server">
                        <asp:LinkButton ID="lbtnSelect" runat="server" 
                            Text="<%$ Resources:Select %>" OnClick="lbtnSelect_Click"></asp:LinkButton>                                
                            </asp:View>
                            <asp:View ID="vwTake" runat="server">
                        <asp:LinkButton ID="lbtnTake" runat="server" OnClick="lbtnTake_Click" Text="<%$ Resources:Take %>"></asp:LinkButton>
                            </asp:View>                       
                        </asp:MultiView>                            
                    
        </itemtemplate>
                    <itemstyle horizontalalign="Center" />
                </asp:TemplateField>
            </Columns>
        </My:MyGridView>
<%--</ContentTemplate>
</asp:UpdatePanel>
--%>